package com.tdkj.model.user;

import java.sql.Timestamp;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.tdkj.model.base.BaseEntity;

/**
 * XnkyAdminSilvercoin entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "xnky_admin_silvercoin")
public class BeanAdminSilvercoin extends BaseEntity{

	// Fields
	private Long numbers;
	private Timestamp createtime;
	private BeanAdmin admin;
	private BeanUser user;

	// Constructors

	/** default constructor */
	public BeanAdminSilvercoin() {
	}

	/** minimal constructor */
	public BeanAdminSilvercoin(long id) {
		this.setId(id);
	}

	/** full constructor */
	public BeanAdminSilvercoin(long id,Long numbers, Timestamp createtime,BeanAdmin admin,BeanUser user) {
		this.setId(id);
		this.numbers = numbers;
		this.createtime = createtime;
		this.admin=admin;
		this.user=user;
	}

	@Column(name = "numbers", precision = 10, scale = 0)
	public Long getNumbers() {
		return this.numbers;
	}

	public void setNumbers(Long numbers) {
		this.numbers = numbers;
	}

	@Column(name = "createtime", nullable = false, length = 19)
	public Timestamp getCreatetime() {
		return this.createtime;
	}

	public void setCreatetime(Timestamp createtime) {
		this.createtime = createtime;
	}
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "adminid", nullable = false)
	public BeanAdmin getAdmin() {
		return this.admin;
	}

	public void setAdmin(BeanAdmin admin) {
		this.admin = admin;
	}
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "userid", nullable = false)
	public BeanUser getUser() {
		return this.user;
	}

	public void setUser(BeanUser user) {
		this.user = user;
	}

}